@extends("/paging_template")
@import com.mgfireworks.mgplatform.mgadmin.sys.model.Organization
@import com.mgfireworks.mgplatform.mgadmin.constants.*
@args List<Organization> organizationList
<s_panel>
	<s_title slot="title">机构列表</s_title>
	<s_input name="orgName" text="机构名称" value="@val("orgName")"></s_input>
	<s_select name="orgType" text="机构类型" value="@val("orgType")">
	@for(OrgType o : OrgType.values()){
		<option value="@o.value()">@o.getPhrase()</option>
	}
	</s_select>
	<s_chooser name="areaName" value="@val("areaName")" name2="areaId" value2="@val("areaId")" url="@url("/sys/area/list.html")" text="区域"></s_chooser>
	<s_buttons slot="button" cols="4">
		<s_button type="query"></s_button>
		<s_button type="link" icon="fa-plus" href="@url("add.html")">添加</s_button>
		<s_button type="link" icon="fa-pencil" href="@url("edit.html?orgId={0}")">修改</s_button>
		<s_button type="del" href="@url("del.json?orgId={0}")">删除</s_button>
	</s_buttons>
</s_panel>

<d_table min-width="1000px">
	<d_tr slot="head">
		<d_th class="d_td_row_id"></d_th>
		<d_th>机构编号</d_th>
		<d_th>机构名称</d_th>
		<d_th>机构类型</d_th>
		<d_th>状态</d_th>
		<d_th>负责人</d_th>
		<d_th>联系方式</d_th>
		<d_th>所在区域</d_th>
	</d_tr>
		@if(organizationList){
		@{int i=0;}
		@for(Organization p : organizationList){
	<d_tr slot="body" class="table_row @(i%2==0?"odd":"event")">
		@{i++;}
		<d_td class="td_row_id">
			<input type="checkbox" class="flat" name="__recordId" value="@p.getOrgId()"/>
		</d_td>
		<d_td>@p.getOrgId()</d_td>
		<d_td>@p.getOrgName()</d_td>
		<d_td>@OrgType.valueOf(p.getOrgType()).getPhrase()</d_td>
		<d_td>@p.getOrgStatus()</d_td>
		<d_td>@p.getOrgOfficial()</d_td>
		<d_td>@p.getOrgContact()</d_td>
		<d_td>@p.getAreaName()</d_td>
	</d_tr>
		}}
</d_table>
